home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0498.dms / q0498.adf / NIBDGEN < prev    next >
Text File  |  1992-06-07  |  3KB  |  163 lines

  1. curdsk=1
  2. colour=1
  3. yyval=12
  4. skipdel=0
  5.  
  6. connect=drives()
  7. cmp connect,-1,0,goto byebye
  8. drivenum=nibcopy(connect,templat,1)
  9. cmp drivenum,0,-1,goto byebye
  10.  
  11. poke(remdsk+19,drivenum+48)
  12. poke(insdsk2+6,drivenum+48)
  13.  
  14. pnf:    dc.b "Protection not found!",0
  15. pnf2:    dc.b "*** PARAMETER FAILED! ***",0
  16. worktxt:dc.b "Working, please stand by...",0
  17.  
  18. prof:    dc.b "*** Parameter Successful! ***",0
  19. remdsk:    dc.b "Remove disk from DF0: then click in this window...",0
  20.  
  21. insdsk:    dc.b "Insert BACKUP of",0
  22. insdsk2:dc.b " in DF0: then click in this window...",0
  23.  
  24.     dc.w 0
  25. oritab:    dc.l orig1,fix1,orig2,fix2,orig3,fix3,orig4,fix4,orig5,fix5
  26.     dc.l orig6,fix6,orig7,fix7,orig8,fix8,orig9,fix9
  27.     dc.l orig10,fix10,orig11,fix11,orig12,fix12,orig13,fix13
  28.     dc.l orig14,fix14,orig15,fix15,orig16,fix16,orig17,fix17
  29.     dc.l orig18,fix18,orig19,fix19,orig20,fix20,orig21,fix21
  30.     dc.l orig22,fix22,orig23,fix23,orig24,fix24,orig25,fix25
  31.     dc.l orig26,fix26,orig27,fix27,orig28,fix28,orig29,fix29
  32.     dc.l orig30,fix30,orig31,fix31,orig32,fix32,orig33,fix33
  33.     dc.l orig34,fix34,orig35,fix35,orig36,fix36,orig37,fix37
  34.     dc.l orig38,fix38,orig39,fix39,orig40,fix40,orig41,fix41
  35.     dc.l orig42,fix42,orig43,fix43,orig44,fix44,orig45,fix45
  36.     dc.l 0,0
  37.  
  38. * Open Window and print intro text...
  39. start:    validate(drivenum,1)
  40.     cmp ^winname,"con:",0,winname=winname+18
  41.     pokel(wtitle,winname)
  42.     gosub openwin
  43.     cmp docopy,1,0,goto main
  44.  
  45.     gosub remm
  46.  
  47.     txtptr=insdsk
  48.     gosub print3d
  49.     colour=3
  50.     txtptr=dname
  51.     gosub print3d
  52.     colour=1
  53.     txtptr=insdsk2
  54.     gosub print3d
  55.  
  56.     gosub waitsgn
  57.     cmp class,$200000,2,goto chkclow
  58.     cmp code,$1b,0,goto remprta
  59. chkclow:cmp class,$200,0,goto remprta
  60.     skipdel=1
  61.  
  62. main:    txtptr=worktxt
  63.     gosub print3d
  64.  
  65.     cmp skipdel,0,2,goto begit
  66.     delay(100)
  67.  
  68. begit:    blklen=winname-xcopy&$fffffe00
  69.     xboot=allocmem(blklen,2)
  70.     memmove(xboot,xcopy,blklen)
  71.     ret=trackdisk(drivenum,3,0,xboot,blklen)
  72.     ret=trackdisk(drivenum,4,0,0,0)
  73.     freemem(xboot,blklen)
  74.     pos=0
  75.     pointer=oritab
  76.  
  77. looper:    orig=^pointer
  78.     pointer=pointer+4
  79.     fix=^pointer
  80.     pointer=pointer+4
  81.     pval=^pointer
  82.     cmp pval,0,0,top=garbage
  83.     cmp pval,0,2,top=pval
  84.  
  85. * Scan file for our string and replace if found...
  86.     pos=dscan(drivenum,orig,fix-orig,fix,top-fix,pos,hfix)
  87.     cmp pos,-2,0,goto errpnf
  88.  
  89.     cmp pval,0,2,goto looper
  90.  
  91.     txtptr=prof
  92.     gosub print3d
  93.  
  94.     delay(100)
  95.     cmp note1,0,0,goto ky1
  96.     colour=3
  97.     txtptr=note1
  98.     gosub print3d
  99.     cmp note2,0,0,goto ky1
  100.     txtptr=note2
  101.     gosub print3d
  102.     cmp note3,0,0,goto ky1
  103.     txtptr=note3
  104.     gosub print3d
  105.  
  106. ky1:    colour=1
  107.     yyval=yyval+10
  108.     txtptr=remdsk
  109.     gosub print3d
  110. ky2:    gosub remm
  111.     gosub waitsgn
  112.     cmp mess,0,0,goto ky2
  113.  
  114.     cmp numdsk,2,-1,goto bye0
  115.     yyval=yyval+10
  116.     txtptr=copyrst
  117.     gosub print3d
  118.     delay(50)
  119.  
  120. ky3:    curdsk=curdsk+1
  121.     cmp curdsk,numdsk,1,goto bye0
  122.     
  123.     tensv=curdsk/10&$ffff
  124.     onesv=tensv*10
  125.     onesv=curdsk-onesv
  126.     poke(dskm1,tensv+48)
  127.     poke(dskm1+1,onesv+48)
  128.  
  129.     tensv=numdsk/10&$ffff
  130.     onesv=tensv*10
  131.     onesv=numdsk-onesv
  132.     poke(dskm2,tensv+48)
  133.     poke(dskm2+1,onesv+48)
  134.  
  135.     docopy=simplereq(cpytitl,nxtdskm)
  136.     cmp docopy,1,-1,goto bye0
  137.     drivenum=fcopy(-1)
  138.     cmp drivenum,0,-1,goto bye0
  139.     goto ky3
  140.  
  141. keyout:    gosub remm
  142.     gosub waitsgn
  143.     cmp mess,0,0,goto keyout
  144. bye0:    gosub closwin
  145. byebye:    validate(drivenum,0)
  146.     end
  147.  
  148. errpnf:    txtptr=pnf
  149.     gosub print3d
  150.     goto prii5a
  151.  
  152. remprt:    delay(150)
  153. remprta:yyval=yyval+10
  154.     txtptr=remdsk
  155.     gosub print3d
  156.     goto keyout
  157.  
  158. prii5a:    txtptr=pnf2
  159.     gosub print3d
  160.     goto remprt
  161.  
  162. #i "Params:WINHAND"
  163.